ABC160 E - Red and Green Apples
提出
code: python
import heapq
x, y, a, b, c = map(int, input().split())
for i in pqr:
i.sort(reverse=True)
# p, qで現段階で食べるやつ
heapq.heapify(eat)
# r(=無色)を回す
min_num = heapq.heappop(eat)
if (i > min_num):
# 入れ替える
heapq.heappush(eat, i)
else:
# 入れ替えない
heapq.heappush(eat, min_num)
break
print(sum(eat))